package thread.implementrunnable;

public class Demo01MyThread {
    public static void main(String[] args) {
        //1.创建runable对象
        MyThread myThread = new MyThread();
        //2.创建Thread对象
        Thread thread01 = new Thread(myThread);
        Thread thread02 = new Thread(myThread);
        Thread thread03 = new Thread(myThread);
        //3.启动线程
        thread01.start();
        thread02.start();
        thread03.start();

        //当前线程数目
        System.out.println(Thread.activeCount());
    }
}
